<template>
	<view class="bank-card">
		
		<view class="list">
			<view
				v-for="item in list"
				:key="item.id"
				class="item"
				:style="{ background: `url(${item.bg}) left top/100% 100% no-repeat` }"
			>
				<view class="d-flex justify-space-between">
					<view class="d-flex">
						<u-image width="60rpx" height="60rpx" shape="circle"></u-image>
						<view style="margin-left: 30rpx;">
							<view class="name">{{ item.name }}</view>
							<view class="type">{{ item.type }}</view>
							<view class="alias">{{ item.alias }}</view>
						</view>
					</view>
					
					<u-button text="解除绑定" @click="unbind(item)" color="rgba(255, 255, 255, 0.28)"></u-button>
				</view>
				
				<view class="number">
					{{ item.number }}
				</view>
			</view>
		</view>
		
		<view class="bottom-add-btn">
			<u-button text="添加银行卡" shape="circle" @click="add" color="linear-gradient(0deg, rgb(47, 117, 250) 0%, rgb(82, 142, 255) 100%)"></u-button>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			list: [
				{
					id: 1,
					name: '中国农业银行',
					number: '****  ****  ****  2738',
					bg: `${this.$https.assetsPath}6bcccdb26e92678e16533d04e947509db3cdf8c1.png`,
					type: '储蓄卡',
					alias: '别名1'
				},
				{
					id: 2,
					name: '中国建设银行',
					number: '****  ****  ****  2738',
					bg: `${this.$https.assetsPath}5d147ed530fb89e54db5abc5614f14fde88cfec0.png`,
					type: '储蓄卡',
					alias: '别名2'
				},
			]
		}
	},
	methods: {
		add() {
			uni.navigateTo({
				url:'/page_venues/pages/bank-card/add/add'
			});
		},
		unbind(item) {
			
		}
	}
}
</script>

<style lang="scss" scoped>
.bank-card {
	min-height: 100vh;
	background-color: #F7F7F7;
	padding: 30rpx;
	
	/deep/.list {
		color: #fff;
		font-size: 26rpx;
		
		.item {
			padding: 28rpx;
			border-radius: 10rpx;
			
			& + .item {
				margin-top: 30rpx;
			}
			
			.u-button {
				width: 163rpx;
				height: 54rpx;
				margin: 0;
				border: none !important;
			}
			
			.type,
			.alias {
				color: rgba(255, 255, 255, 0.6);
			}
			
			.number {
				margin-top: 50rpx;
				text-align: right;
				margin-right: 70rpx;
				font-size: 44rpx;
			}
		}
	}
}
</style>
